<template>
  <el-container class="login-container">
    <el-card class="login-box">
      <el-form :model="loginForm" class="login-form">
        <el-form-item prop="username">
          <el-input
            prefix-icon="el-icon-user-solid"
            v-model="loginForm.username"
          ></el-input>
        </el-form-item>
        <el-form-item prop="password">
          <el-input
            type="password"
            prefix-icon="el-icon-lock"
            v-model="loginForm.password"
          ></el-input>
        </el-form-item>
        <el-form-item class="btn">
          <el-button type="primary">Sign in</el-button>
        </el-form-item>
      </el-form>
    </el-card>
  </el-container>
</template>

<script>
export default {
  data () {
    return {
      loginForm: {
        username: 'admin',
        password: 123456
      }
    }
  },
}
</script>

<style scoped>
.login-container {
  height: 100vh;
  background: url("~@/assets/images/490951454030546.jpg") no-repeat;
  background-size: cover;
}

.login-box {
  width: 450px;
  height: 250px;
  background-color: #fff;
  border-radius: 3px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.login-form {
  position: absolute;
  width: 92%;
  bottom: 8%;
}

.btn {
  display: flex;
  justify-content: flex-end;
}
</style>